<?php
/**
 * Created by PhpStorm.
 * User: THINK
 * Date: 2017/8/25
 * Time: 15:20
 */

namespace Admin\Controller;
use Think\Controller;

class PageController extends Controller
{
    public function index(){
        $id = I('pid');
        $User = M('category');
        $list = $User->find($id);
        /*        dump($list);exit;*/
        $this->assign('list',$list);
        $this->display();
    }

      public function edit(){
        $User = M('category');
        $data = I('post.');
       /* dump($data);exit;*/
        /*       dump(U('Page/index',array('id'=>$data['id'])));exit;*/
        $User->save($data);
        $this->success('修改成功');
    }
}